// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueCodemirror from 'vue-codemirror'

import router from './router'
import '@/core/icons' // icon
import '@/core/' // 组件注册

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueCodemirror, {
  options: {
    tabSize: 2,
    styleActiveLine: false,
    lineNumbers: true,     // 是否在编辑器左侧显示行号
    line: true,
    theme: 'monokai',      // 主题
    foldgutter: true,
    autocorrect: true,
    lineWrapping: true,   // 是否代码折叠
    matchBrackets: true,  // 括号匹配
    extraKeys: {'Tab': 'autocomplete'},
    autoCloseBrackets: true
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store, //store:store 和router一样，将我们创建的Vuex实例挂载到这个vue实例中
  components: {App},
  template: '<App/>'
})
